#ifndef TEST_APPLICATION_H
#define TEST_APPLICATION_H

#include <CEGUI.h>
#include <CEGUIOgreRenderer.h>
#include <Ogre.h>
#include <OIS/OIS.h>
#include "TestListener.h"

using namespace Ogre;
using namespace CEGUI;

class TestApplication
{

public:
    TestApplication();
    ~TestApplication();

    void go();

    Root* GetRoot();

private:
    Root* mRoot;
    OIS::Keyboard* mKeyboard;
    OIS::Mouse* mMouse;
    OIS::InputManager* mInputMgr;
    CEGUI::OgreRenderer* mRenderer;
    TestListener* mListener;

    void init();
    void createRoot();
    void defineResources();
    void setupRenderSystem();
    void createRenderWindow();
    void initializeResourcesGroups();
    void setupScene();
    void setupInputSystem();
    void setupCEGUI();
    void createFrameListener();
    void startRenderLoop();

    //CEGUI Menu.
    void createScene();
};

#endif